package meta

import "game/game-design-v.xnanz/loader"

type ColumnMeta struct {
	//字段名字
	name string
	//字段类型
	form string
	//字段标签
	tags []string
	//字段备注
	comment string
}

func (meta *ColumnMeta) Name() string {
	return meta.name
}
func (meta *ColumnMeta) Form() string {
	return meta.form
}
func (meta *ColumnMeta) Tags() []string {
	return meta.tags
}
func (meta *ColumnMeta) Comment() string {
	return meta.comment
}

func NewColumnMeta(field *loader.DesignField) *ColumnMeta {
	var meta ColumnMeta
	meta.name = field.FieldName
	meta.form = field.FieldType
	meta.tags = field.FieldTags
	meta.comment = field.FieldComment
	return &meta
}
